package org.dtrd.modules.content.articles.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.dtrd.modules.content.articles.entity.bean.ArticleCategory;
import org.dtrd.modules.content.articles.entity.po.DtrdExtEmsCategory;

import java.util.List;

public interface DtrdExtEmsCategoryMapper extends BaseMapper<DtrdExtEmsCategory> {

    /**
     * 删除分类
     *
     * @param classId
     */
    void deleteCategoryById(@Param("classId") Integer classId);

    List<ArticleCategory> selectCategoryAndArticleCount(@Param("parentId") Integer parentId);

    /**
     * 层次化查询所有分类数据
     *
     * @param classId
     * @return
     */
    List<ArticleCategory> getAllCategory(@Param("classId") Integer classId);
}